package cn.dz.dao.impl;

import cn.dz.dao.UserDao;
import org.springframework.beans.factory.InitializingBean;

/**
 * @ClassName UserDaoImpl
 * @package: cn.dz.dao.impl
 * @Description UserDaoImpl
 * @Author dz
 * @Date 2025/1/22 12:45
 * @Version 1.0
 **/
public class UserDaoImpl implements UserDao, InitializingBean {
    public UserDaoImpl() {
        System.out.println("UserDaoImpl创建了...");
    }

    @Override
    public void init() {
        System.out.println("初始化方法...");
    }

    @Override
    public void destroy() {
        System.out.println("销毁方法...");
    }

    //执行时机早于init-method配置的方法
    public void afterPropertiesSet() throws Exception {
        System.out.println("afterPropertiesSet执行...");
    }
}
